package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * @author RJ
 * @date 2022/9/13 16:11
 */
/*
    小班管理
 */
@TableName("class_info")
public class ClassBean {
    //小班id
    @TableId(value = "class_id", type = IdType.AUTO)
    private Integer classId;
    //名称
    @TableField("class_name")
    private String className;
    //负责人
    @TableField("class_manager")
    private String classManager;
    //负责人电话
    @TableField("class_phone")
    private String classPhone;
    //人员数量
    @TableField("class_num")
    private Integer classNum;
    //创建时间
    @TableField("class_date")
    private LocalDate classDate = LocalDate.now();
    //区域实体
    @TableField(exist = false)
    private AreaBean theArea;

    public ClassBean() {
    }

    public ClassBean(String className, String classManager, String classPhone, Integer classNum, Integer areaId) {
        this.className = className;
        this.classManager = classManager;
        this.classPhone = classPhone;
        this.classNum = classNum;
        this.theArea = new AreaBean();
        this.theArea.setAreaId(areaId);
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getClassManager() {
        return classManager;
    }

    public void setClassManager(String classManager) {
        this.classManager = classManager;
    }

    public String getClassPhone() {
        return classPhone;
    }

    public void setClassPhone(String classPhone) {
        this.classPhone = classPhone;
    }

    public Integer getClassNum() {
        return classNum;
    }

    public void setClassNum(Integer classNum) {
        this.classNum = classNum;
    }

    public LocalDate getClassDate() {
        return classDate;
    }

    public void setClassDate(LocalDate classDate) {
        this.classDate = classDate;
    }

    public AreaBean getTheArea() {
        return theArea;
    }

    public void setTheArea(AreaBean theArea) {
        this.theArea = theArea;
    }

    @Override
    public String toString() {
        return "ClassBean{" +
                "classId=" + classId +
                ", className='" + className + '\'' +
                ", classManager='" + classManager + '\'' +
                ", classPhone='" + classPhone + '\'' +
                ", classNum=" + classNum +
                ", classDate=" + classDate +
                ", theArea=" + theArea +
                '}';
    }
}
